/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3.impl;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.Enumerator;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;

import org.hl7.v3.AD;
import org.hl7.v3.AdxpAdditionalLocator;
import org.hl7.v3.AdxpBuildingNumberSuffix;
import org.hl7.v3.AdxpCareOf;
import org.hl7.v3.AdxpCensusTract;
import org.hl7.v3.AdxpCity;
import org.hl7.v3.AdxpCountry;
import org.hl7.v3.AdxpCounty;
import org.hl7.v3.AdxpDelimiter;
import org.hl7.v3.AdxpDeliveryAddressLine;
import org.hl7.v3.AdxpDeliveryInstallationArea;
import org.hl7.v3.AdxpDeliveryInstallationQualifier;
import org.hl7.v3.AdxpDeliveryInstallationType;
import org.hl7.v3.AdxpDeliveryMode;
import org.hl7.v3.AdxpDeliveryModeIdentifier;
import org.hl7.v3.AdxpDirection;
import org.hl7.v3.AdxpHouseNumber;
import org.hl7.v3.AdxpHouseNumberNumeric;
import org.hl7.v3.AdxpPostBox;
import org.hl7.v3.AdxpPostalCode;
import org.hl7.v3.AdxpPrecinct;
import org.hl7.v3.AdxpState;
import org.hl7.v3.AdxpStreetAddressLine;
import org.hl7.v3.AdxpStreetName;
import org.hl7.v3.AdxpStreetNameBase;
import org.hl7.v3.AdxpStreetNameType;
import org.hl7.v3.AdxpUnitID;
import org.hl7.v3.AdxpUnitType;
import org.hl7.v3.SXCMTS;
import org.hl7.v3.V3Package;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>AD</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getMixed <em>Mixed</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getGroup <em>Group</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDelimiter <em>Delimiter</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getCountry <em>Country</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getState <em>State</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getCounty <em>County</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getCity <em>City</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getPostalCode <em>Postal Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getStreetAddressLine <em>Street Address Line</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getHouseNumber <em>House Number</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getHouseNumberNumeric <em>House Number Numeric</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDirection <em>Direction</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getStreetName <em>Street Name</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getStreetNameBase <em>Street Name Base</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getStreetNameType <em>Street Name Type</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getAdditionalLocator <em>Additional Locator</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getUnitID <em>Unit ID</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getUnitType <em>Unit Type</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getCareOf <em>Care Of</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getCensusTract <em>Census Tract</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDeliveryAddressLine <em>Delivery Address Line</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDeliveryInstallationType <em>Delivery Installation Type</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDeliveryInstallationArea <em>Delivery Installation Area</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDeliveryInstallationQualifier <em>Delivery Installation Qualifier</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDeliveryMode <em>Delivery Mode</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getDeliveryModeIdentifier <em>Delivery Mode Identifier</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getBuildingNumberSuffix <em>Building Number Suffix</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getPostBox <em>Post Box</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getPrecinct <em>Precinct</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getUseablePeriod <em>Useable Period</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#isIsNotOrdered <em>Is Not Ordered</em>}</li>
 *   <li>{@link org.hl7.v3.impl.ADImpl#getUse <em>Use</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ADImpl extends ANYImpl implements AD {
	/**
	 * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMixed()
	 * @generated
	 * @ordered
	 */
	protected FeatureMap mixed;

	/**
	 * The default value of the '{@link #isIsNotOrdered() <em>Is Not Ordered</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isIsNotOrdered()
	 * @generated
	 * @ordered
	 */
	protected static final boolean IS_NOT_ORDERED_EDEFAULT = false;

	/**
	 * The cached value of the '{@link #isIsNotOrdered() <em>Is Not Ordered</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isIsNotOrdered()
	 * @generated
	 * @ordered
	 */
	protected boolean isNotOrdered = IS_NOT_ORDERED_EDEFAULT;

	/**
	 * This is true if the Is Not Ordered attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean isNotOrderedESet;

	/**
	 * The default value of the '{@link #getUse() <em>Use</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getUse()
	 * @generated
	 * @ordered
	 */
	protected static final List<Enumerator> USE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getUse() <em>Use</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getUse()
	 * @generated
	 * @ordered
	 */
	protected List<Enumerator> use = USE_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ADImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return V3Package.eINSTANCE.getAD();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FeatureMap getMixed() {
		if (mixed == null) {
			mixed = new BasicFeatureMap(this, V3Package.AD__MIXED);
		}
		return mixed;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FeatureMap getGroup() {
		return (FeatureMap)getMixed().<FeatureMap.Entry>list(V3Package.eINSTANCE.getAD_Group());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDelimiter> getDelimiter() {
		return getGroup().list(V3Package.eINSTANCE.getAD_Delimiter());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpCountry> getCountry() {
		return getGroup().list(V3Package.eINSTANCE.getAD_Country());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpState> getState() {
		return getGroup().list(V3Package.eINSTANCE.getAD_State());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpCounty> getCounty() {
		return getGroup().list(V3Package.eINSTANCE.getAD_County());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpCity> getCity() {
		return getGroup().list(V3Package.eINSTANCE.getAD_City());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpPostalCode> getPostalCode() {
		return getGroup().list(V3Package.eINSTANCE.getAD_PostalCode());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpStreetAddressLine> getStreetAddressLine() {
		return getGroup().list(V3Package.eINSTANCE.getAD_StreetAddressLine());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpHouseNumber> getHouseNumber() {
		return getGroup().list(V3Package.eINSTANCE.getAD_HouseNumber());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpHouseNumberNumeric> getHouseNumberNumeric() {
		return getGroup().list(V3Package.eINSTANCE.getAD_HouseNumberNumeric());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDirection> getDirection() {
		return getGroup().list(V3Package.eINSTANCE.getAD_Direction());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpStreetName> getStreetName() {
		return getGroup().list(V3Package.eINSTANCE.getAD_StreetName());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpStreetNameBase> getStreetNameBase() {
		return getGroup().list(V3Package.eINSTANCE.getAD_StreetNameBase());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpStreetNameType> getStreetNameType() {
		return getGroup().list(V3Package.eINSTANCE.getAD_StreetNameType());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpAdditionalLocator> getAdditionalLocator() {
		return getGroup().list(V3Package.eINSTANCE.getAD_AdditionalLocator());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpUnitID> getUnitID() {
		return getGroup().list(V3Package.eINSTANCE.getAD_UnitID());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpUnitType> getUnitType() {
		return getGroup().list(V3Package.eINSTANCE.getAD_UnitType());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpCareOf> getCareOf() {
		return getGroup().list(V3Package.eINSTANCE.getAD_CareOf());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpCensusTract> getCensusTract() {
		return getGroup().list(V3Package.eINSTANCE.getAD_CensusTract());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDeliveryAddressLine> getDeliveryAddressLine() {
		return getGroup().list(V3Package.eINSTANCE.getAD_DeliveryAddressLine());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDeliveryInstallationType> getDeliveryInstallationType() {
		return getGroup().list(V3Package.eINSTANCE.getAD_DeliveryInstallationType());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDeliveryInstallationArea> getDeliveryInstallationArea() {
		return getGroup().list(V3Package.eINSTANCE.getAD_DeliveryInstallationArea());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDeliveryInstallationQualifier> getDeliveryInstallationQualifier() {
		return getGroup().list(V3Package.eINSTANCE.getAD_DeliveryInstallationQualifier());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDeliveryMode> getDeliveryMode() {
		return getGroup().list(V3Package.eINSTANCE.getAD_DeliveryMode());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpDeliveryModeIdentifier> getDeliveryModeIdentifier() {
		return getGroup().list(V3Package.eINSTANCE.getAD_DeliveryModeIdentifier());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpBuildingNumberSuffix> getBuildingNumberSuffix() {
		return getGroup().list(V3Package.eINSTANCE.getAD_BuildingNumberSuffix());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpPostBox> getPostBox() {
		return getGroup().list(V3Package.eINSTANCE.getAD_PostBox());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<AdxpPrecinct> getPrecinct() {
		return getGroup().list(V3Package.eINSTANCE.getAD_Precinct());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<SXCMTS> getUseablePeriod() {
		return getMixed().list(V3Package.eINSTANCE.getAD_UseablePeriod());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isIsNotOrdered() {
		return isNotOrdered;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIsNotOrdered(boolean newIsNotOrdered) {
		boolean oldIsNotOrdered = isNotOrdered;
		isNotOrdered = newIsNotOrdered;
		boolean oldIsNotOrderedESet = isNotOrderedESet;
		isNotOrderedESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.AD__IS_NOT_ORDERED, oldIsNotOrdered, isNotOrdered, !oldIsNotOrderedESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetIsNotOrdered() {
		boolean oldIsNotOrdered = isNotOrdered;
		boolean oldIsNotOrderedESet = isNotOrderedESet;
		isNotOrdered = IS_NOT_ORDERED_EDEFAULT;
		isNotOrderedESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, V3Package.AD__IS_NOT_ORDERED, oldIsNotOrdered, IS_NOT_ORDERED_EDEFAULT, oldIsNotOrderedESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetIsNotOrdered() {
		return isNotOrderedESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public List<Enumerator> getUse() {
		return use;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setUse(List<Enumerator> newUse) {
		List<Enumerator> oldUse = use;
		use = newUse;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.AD__USE, oldUse, use));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case V3Package.AD__MIXED:
				return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);
			case V3Package.AD__GROUP:
				return ((InternalEList<?>)getGroup()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DELIMITER:
				return ((InternalEList<?>)getDelimiter()).basicRemove(otherEnd, msgs);
			case V3Package.AD__COUNTRY:
				return ((InternalEList<?>)getCountry()).basicRemove(otherEnd, msgs);
			case V3Package.AD__STATE:
				return ((InternalEList<?>)getState()).basicRemove(otherEnd, msgs);
			case V3Package.AD__COUNTY:
				return ((InternalEList<?>)getCounty()).basicRemove(otherEnd, msgs);
			case V3Package.AD__CITY:
				return ((InternalEList<?>)getCity()).basicRemove(otherEnd, msgs);
			case V3Package.AD__POSTAL_CODE:
				return ((InternalEList<?>)getPostalCode()).basicRemove(otherEnd, msgs);
			case V3Package.AD__STREET_ADDRESS_LINE:
				return ((InternalEList<?>)getStreetAddressLine()).basicRemove(otherEnd, msgs);
			case V3Package.AD__HOUSE_NUMBER:
				return ((InternalEList<?>)getHouseNumber()).basicRemove(otherEnd, msgs);
			case V3Package.AD__HOUSE_NUMBER_NUMERIC:
				return ((InternalEList<?>)getHouseNumberNumeric()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DIRECTION:
				return ((InternalEList<?>)getDirection()).basicRemove(otherEnd, msgs);
			case V3Package.AD__STREET_NAME:
				return ((InternalEList<?>)getStreetName()).basicRemove(otherEnd, msgs);
			case V3Package.AD__STREET_NAME_BASE:
				return ((InternalEList<?>)getStreetNameBase()).basicRemove(otherEnd, msgs);
			case V3Package.AD__STREET_NAME_TYPE:
				return ((InternalEList<?>)getStreetNameType()).basicRemove(otherEnd, msgs);
			case V3Package.AD__ADDITIONAL_LOCATOR:
				return ((InternalEList<?>)getAdditionalLocator()).basicRemove(otherEnd, msgs);
			case V3Package.AD__UNIT_ID:
				return ((InternalEList<?>)getUnitID()).basicRemove(otherEnd, msgs);
			case V3Package.AD__UNIT_TYPE:
				return ((InternalEList<?>)getUnitType()).basicRemove(otherEnd, msgs);
			case V3Package.AD__CARE_OF:
				return ((InternalEList<?>)getCareOf()).basicRemove(otherEnd, msgs);
			case V3Package.AD__CENSUS_TRACT:
				return ((InternalEList<?>)getCensusTract()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DELIVERY_ADDRESS_LINE:
				return ((InternalEList<?>)getDeliveryAddressLine()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DELIVERY_INSTALLATION_TYPE:
				return ((InternalEList<?>)getDeliveryInstallationType()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DELIVERY_INSTALLATION_AREA:
				return ((InternalEList<?>)getDeliveryInstallationArea()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DELIVERY_INSTALLATION_QUALIFIER:
				return ((InternalEList<?>)getDeliveryInstallationQualifier()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DELIVERY_MODE:
				return ((InternalEList<?>)getDeliveryMode()).basicRemove(otherEnd, msgs);
			case V3Package.AD__DELIVERY_MODE_IDENTIFIER:
				return ((InternalEList<?>)getDeliveryModeIdentifier()).basicRemove(otherEnd, msgs);
			case V3Package.AD__BUILDING_NUMBER_SUFFIX:
				return ((InternalEList<?>)getBuildingNumberSuffix()).basicRemove(otherEnd, msgs);
			case V3Package.AD__POST_BOX:
				return ((InternalEList<?>)getPostBox()).basicRemove(otherEnd, msgs);
			case V3Package.AD__PRECINCT:
				return ((InternalEList<?>)getPrecinct()).basicRemove(otherEnd, msgs);
			case V3Package.AD__USEABLE_PERIOD:
				return ((InternalEList<?>)getUseablePeriod()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case V3Package.AD__MIXED:
				if (coreType) return getMixed();
				return ((FeatureMap.Internal)getMixed()).getWrapper();
			case V3Package.AD__GROUP:
				if (coreType) return getGroup();
				return ((FeatureMap.Internal)getGroup()).getWrapper();
			case V3Package.AD__DELIMITER:
				return getDelimiter();
			case V3Package.AD__COUNTRY:
				return getCountry();
			case V3Package.AD__STATE:
				return getState();
			case V3Package.AD__COUNTY:
				return getCounty();
			case V3Package.AD__CITY:
				return getCity();
			case V3Package.AD__POSTAL_CODE:
				return getPostalCode();
			case V3Package.AD__STREET_ADDRESS_LINE:
				return getStreetAddressLine();
			case V3Package.AD__HOUSE_NUMBER:
				return getHouseNumber();
			case V3Package.AD__HOUSE_NUMBER_NUMERIC:
				return getHouseNumberNumeric();
			case V3Package.AD__DIRECTION:
				return getDirection();
			case V3Package.AD__STREET_NAME:
				return getStreetName();
			case V3Package.AD__STREET_NAME_BASE:
				return getStreetNameBase();
			case V3Package.AD__STREET_NAME_TYPE:
				return getStreetNameType();
			case V3Package.AD__ADDITIONAL_LOCATOR:
				return getAdditionalLocator();
			case V3Package.AD__UNIT_ID:
				return getUnitID();
			case V3Package.AD__UNIT_TYPE:
				return getUnitType();
			case V3Package.AD__CARE_OF:
				return getCareOf();
			case V3Package.AD__CENSUS_TRACT:
				return getCensusTract();
			case V3Package.AD__DELIVERY_ADDRESS_LINE:
				return getDeliveryAddressLine();
			case V3Package.AD__DELIVERY_INSTALLATION_TYPE:
				return getDeliveryInstallationType();
			case V3Package.AD__DELIVERY_INSTALLATION_AREA:
				return getDeliveryInstallationArea();
			case V3Package.AD__DELIVERY_INSTALLATION_QUALIFIER:
				return getDeliveryInstallationQualifier();
			case V3Package.AD__DELIVERY_MODE:
				return getDeliveryMode();
			case V3Package.AD__DELIVERY_MODE_IDENTIFIER:
				return getDeliveryModeIdentifier();
			case V3Package.AD__BUILDING_NUMBER_SUFFIX:
				return getBuildingNumberSuffix();
			case V3Package.AD__POST_BOX:
				return getPostBox();
			case V3Package.AD__PRECINCT:
				return getPrecinct();
			case V3Package.AD__USEABLE_PERIOD:
				return getUseablePeriod();
			case V3Package.AD__IS_NOT_ORDERED:
				return isIsNotOrdered() ? Boolean.TRUE : Boolean.FALSE;
			case V3Package.AD__USE:
				return getUse();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case V3Package.AD__MIXED:
				((FeatureMap.Internal)getMixed()).set(newValue);
				return;
			case V3Package.AD__GROUP:
				((FeatureMap.Internal)getGroup()).set(newValue);
				return;
			case V3Package.AD__DELIMITER:
				getDelimiter().clear();
				getDelimiter().addAll((Collection<? extends AdxpDelimiter>)newValue);
				return;
			case V3Package.AD__COUNTRY:
				getCountry().clear();
				getCountry().addAll((Collection<? extends AdxpCountry>)newValue);
				return;
			case V3Package.AD__STATE:
				getState().clear();
				getState().addAll((Collection<? extends AdxpState>)newValue);
				return;
			case V3Package.AD__COUNTY:
				getCounty().clear();
				getCounty().addAll((Collection<? extends AdxpCounty>)newValue);
				return;
			case V3Package.AD__CITY:
				getCity().clear();
				getCity().addAll((Collection<? extends AdxpCity>)newValue);
				return;
			case V3Package.AD__POSTAL_CODE:
				getPostalCode().clear();
				getPostalCode().addAll((Collection<? extends AdxpPostalCode>)newValue);
				return;
			case V3Package.AD__STREET_ADDRESS_LINE:
				getStreetAddressLine().clear();
				getStreetAddressLine().addAll((Collection<? extends AdxpStreetAddressLine>)newValue);
				return;
			case V3Package.AD__HOUSE_NUMBER:
				getHouseNumber().clear();
				getHouseNumber().addAll((Collection<? extends AdxpHouseNumber>)newValue);
				return;
			case V3Package.AD__HOUSE_NUMBER_NUMERIC:
				getHouseNumberNumeric().clear();
				getHouseNumberNumeric().addAll((Collection<? extends AdxpHouseNumberNumeric>)newValue);
				return;
			case V3Package.AD__DIRECTION:
				getDirection().clear();
				getDirection().addAll((Collection<? extends AdxpDirection>)newValue);
				return;
			case V3Package.AD__STREET_NAME:
				getStreetName().clear();
				getStreetName().addAll((Collection<? extends AdxpStreetName>)newValue);
				return;
			case V3Package.AD__STREET_NAME_BASE:
				getStreetNameBase().clear();
				getStreetNameBase().addAll((Collection<? extends AdxpStreetNameBase>)newValue);
				return;
			case V3Package.AD__STREET_NAME_TYPE:
				getStreetNameType().clear();
				getStreetNameType().addAll((Collection<? extends AdxpStreetNameType>)newValue);
				return;
			case V3Package.AD__ADDITIONAL_LOCATOR:
				getAdditionalLocator().clear();
				getAdditionalLocator().addAll((Collection<? extends AdxpAdditionalLocator>)newValue);
				return;
			case V3Package.AD__UNIT_ID:
				getUnitID().clear();
				getUnitID().addAll((Collection<? extends AdxpUnitID>)newValue);
				return;
			case V3Package.AD__UNIT_TYPE:
				getUnitType().clear();
				getUnitType().addAll((Collection<? extends AdxpUnitType>)newValue);
				return;
			case V3Package.AD__CARE_OF:
				getCareOf().clear();
				getCareOf().addAll((Collection<? extends AdxpCareOf>)newValue);
				return;
			case V3Package.AD__CENSUS_TRACT:
				getCensusTract().clear();
				getCensusTract().addAll((Collection<? extends AdxpCensusTract>)newValue);
				return;
			case V3Package.AD__DELIVERY_ADDRESS_LINE:
				getDeliveryAddressLine().clear();
				getDeliveryAddressLine().addAll((Collection<? extends AdxpDeliveryAddressLine>)newValue);
				return;
			case V3Package.AD__DELIVERY_INSTALLATION_TYPE:
				getDeliveryInstallationType().clear();
				getDeliveryInstallationType().addAll((Collection<? extends AdxpDeliveryInstallationType>)newValue);
				return;
			case V3Package.AD__DELIVERY_INSTALLATION_AREA:
				getDeliveryInstallationArea().clear();
				getDeliveryInstallationArea().addAll((Collection<? extends AdxpDeliveryInstallationArea>)newValue);
				return;
			case V3Package.AD__DELIVERY_INSTALLATION_QUALIFIER:
				getDeliveryInstallationQualifier().clear();
				getDeliveryInstallationQualifier().addAll((Collection<? extends AdxpDeliveryInstallationQualifier>)newValue);
				return;
			case V3Package.AD__DELIVERY_MODE:
				getDeliveryMode().clear();
				getDeliveryMode().addAll((Collection<? extends AdxpDeliveryMode>)newValue);
				return;
			case V3Package.AD__DELIVERY_MODE_IDENTIFIER:
				getDeliveryModeIdentifier().clear();
				getDeliveryModeIdentifier().addAll((Collection<? extends AdxpDeliveryModeIdentifier>)newValue);
				return;
			case V3Package.AD__BUILDING_NUMBER_SUFFIX:
				getBuildingNumberSuffix().clear();
				getBuildingNumberSuffix().addAll((Collection<? extends AdxpBuildingNumberSuffix>)newValue);
				return;
			case V3Package.AD__POST_BOX:
				getPostBox().clear();
				getPostBox().addAll((Collection<? extends AdxpPostBox>)newValue);
				return;
			case V3Package.AD__PRECINCT:
				getPrecinct().clear();
				getPrecinct().addAll((Collection<? extends AdxpPrecinct>)newValue);
				return;
			case V3Package.AD__USEABLE_PERIOD:
				getUseablePeriod().clear();
				getUseablePeriod().addAll((Collection<? extends SXCMTS>)newValue);
				return;
			case V3Package.AD__IS_NOT_ORDERED:
				setIsNotOrdered(((Boolean)newValue).booleanValue());
				return;
			case V3Package.AD__USE:
				setUse((List<Enumerator>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case V3Package.AD__MIXED:
				getMixed().clear();
				return;
			case V3Package.AD__GROUP:
				getGroup().clear();
				return;
			case V3Package.AD__DELIMITER:
				getDelimiter().clear();
				return;
			case V3Package.AD__COUNTRY:
				getCountry().clear();
				return;
			case V3Package.AD__STATE:
				getState().clear();
				return;
			case V3Package.AD__COUNTY:
				getCounty().clear();
				return;
			case V3Package.AD__CITY:
				getCity().clear();
				return;
			case V3Package.AD__POSTAL_CODE:
				getPostalCode().clear();
				return;
			case V3Package.AD__STREET_ADDRESS_LINE:
				getStreetAddressLine().clear();
				return;
			case V3Package.AD__HOUSE_NUMBER:
				getHouseNumber().clear();
				return;
			case V3Package.AD__HOUSE_NUMBER_NUMERIC:
				getHouseNumberNumeric().clear();
				return;
			case V3Package.AD__DIRECTION:
				getDirection().clear();
				return;
			case V3Package.AD__STREET_NAME:
				getStreetName().clear();
				return;
			case V3Package.AD__STREET_NAME_BASE:
				getStreetNameBase().clear();
				return;
			case V3Package.AD__STREET_NAME_TYPE:
				getStreetNameType().clear();
				return;
			case V3Package.AD__ADDITIONAL_LOCATOR:
				getAdditionalLocator().clear();
				return;
			case V3Package.AD__UNIT_ID:
				getUnitID().clear();
				return;
			case V3Package.AD__UNIT_TYPE:
				getUnitType().clear();
				return;
			case V3Package.AD__CARE_OF:
				getCareOf().clear();
				return;
			case V3Package.AD__CENSUS_TRACT:
				getCensusTract().clear();
				return;
			case V3Package.AD__DELIVERY_ADDRESS_LINE:
				getDeliveryAddressLine().clear();
				return;
			case V3Package.AD__DELIVERY_INSTALLATION_TYPE:
				getDeliveryInstallationType().clear();
				return;
			case V3Package.AD__DELIVERY_INSTALLATION_AREA:
				getDeliveryInstallationArea().clear();
				return;
			case V3Package.AD__DELIVERY_INSTALLATION_QUALIFIER:
				getDeliveryInstallationQualifier().clear();
				return;
			case V3Package.AD__DELIVERY_MODE:
				getDeliveryMode().clear();
				return;
			case V3Package.AD__DELIVERY_MODE_IDENTIFIER:
				getDeliveryModeIdentifier().clear();
				return;
			case V3Package.AD__BUILDING_NUMBER_SUFFIX:
				getBuildingNumberSuffix().clear();
				return;
			case V3Package.AD__POST_BOX:
				getPostBox().clear();
				return;
			case V3Package.AD__PRECINCT:
				getPrecinct().clear();
				return;
			case V3Package.AD__USEABLE_PERIOD:
				getUseablePeriod().clear();
				return;
			case V3Package.AD__IS_NOT_ORDERED:
				unsetIsNotOrdered();
				return;
			case V3Package.AD__USE:
				setUse(USE_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case V3Package.AD__MIXED:
				return mixed != null && !mixed.isEmpty();
			case V3Package.AD__GROUP:
				return !getGroup().isEmpty();
			case V3Package.AD__DELIMITER:
				return !getDelimiter().isEmpty();
			case V3Package.AD__COUNTRY:
				return !getCountry().isEmpty();
			case V3Package.AD__STATE:
				return !getState().isEmpty();
			case V3Package.AD__COUNTY:
				return !getCounty().isEmpty();
			case V3Package.AD__CITY:
				return !getCity().isEmpty();
			case V3Package.AD__POSTAL_CODE:
				return !getPostalCode().isEmpty();
			case V3Package.AD__STREET_ADDRESS_LINE:
				return !getStreetAddressLine().isEmpty();
			case V3Package.AD__HOUSE_NUMBER:
				return !getHouseNumber().isEmpty();
			case V3Package.AD__HOUSE_NUMBER_NUMERIC:
				return !getHouseNumberNumeric().isEmpty();
			case V3Package.AD__DIRECTION:
				return !getDirection().isEmpty();
			case V3Package.AD__STREET_NAME:
				return !getStreetName().isEmpty();
			case V3Package.AD__STREET_NAME_BASE:
				return !getStreetNameBase().isEmpty();
			case V3Package.AD__STREET_NAME_TYPE:
				return !getStreetNameType().isEmpty();
			case V3Package.AD__ADDITIONAL_LOCATOR:
				return !getAdditionalLocator().isEmpty();
			case V3Package.AD__UNIT_ID:
				return !getUnitID().isEmpty();
			case V3Package.AD__UNIT_TYPE:
				return !getUnitType().isEmpty();
			case V3Package.AD__CARE_OF:
				return !getCareOf().isEmpty();
			case V3Package.AD__CENSUS_TRACT:
				return !getCensusTract().isEmpty();
			case V3Package.AD__DELIVERY_ADDRESS_LINE:
				return !getDeliveryAddressLine().isEmpty();
			case V3Package.AD__DELIVERY_INSTALLATION_TYPE:
				return !getDeliveryInstallationType().isEmpty();
			case V3Package.AD__DELIVERY_INSTALLATION_AREA:
				return !getDeliveryInstallationArea().isEmpty();
			case V3Package.AD__DELIVERY_INSTALLATION_QUALIFIER:
				return !getDeliveryInstallationQualifier().isEmpty();
			case V3Package.AD__DELIVERY_MODE:
				return !getDeliveryMode().isEmpty();
			case V3Package.AD__DELIVERY_MODE_IDENTIFIER:
				return !getDeliveryModeIdentifier().isEmpty();
			case V3Package.AD__BUILDING_NUMBER_SUFFIX:
				return !getBuildingNumberSuffix().isEmpty();
			case V3Package.AD__POST_BOX:
				return !getPostBox().isEmpty();
			case V3Package.AD__PRECINCT:
				return !getPrecinct().isEmpty();
			case V3Package.AD__USEABLE_PERIOD:
				return !getUseablePeriod().isEmpty();
			case V3Package.AD__IS_NOT_ORDERED:
				return isSetIsNotOrdered();
			case V3Package.AD__USE:
				return USE_EDEFAULT == null ? use != null : !USE_EDEFAULT.equals(use);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (mixed: ");
		result.append(mixed);
		result.append(", isNotOrdered: ");
		if (isNotOrderedESet) result.append(isNotOrdered); else result.append("<unset>");
		result.append(", use: ");
		result.append(use);
		result.append(')');
		return result.toString();
	}

} //ADImpl
